package lamda.optional;

import java.util.Optional;

/**
 * @author LoneRanger
 * @version 1.0
 */
public class OptionalTest {

	public static void main(String[] args) {
		Integer a = null;

		Integer integer = Optional.ofNullable(a).orElseGet(() -> getI());
		System.out.println(integer);

	}

	private static Integer getI() {
		System.out.println(111);
		return null;
	}
}
